<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="${pageContext.request.contextPath }/statics/js/jquery-1.8.3.min.js" type="text/javascript"></script>
</head>
<body>
	<form action="${pageContext.request.contextPath }/save.html" id="cform">
	<div align="center">
		<h2>我要提问</h2><br>
		<a href="${pageContext.request.contextPath }/qlist.html">返回首页</a><br>
		问题：<input type="text" id="title" name="title"> <br>
		问题描述：<textarea rows="5" cols="20" id="detailDesc" name="detailDesc"></textarea><br>
		<input type="button" id="btn" onclick="save();" value="保存问题">
	</div>
	</form>
</body>
<script type="text/javascript">
	function save(){
		if($("#title").val()=="" || $("#title").val()==null){
			alert("请填写问题");
		}else{
			$("#cform").submit();
		}
	}
</script>
</html>